<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>后台管理系统</title>
<meta name="author" content="DeathGhost" />
<link rel="stylesheet" type="text/css"
	href="/xiaorong/resources/css/style.css" />
<script src="/xiaorong/resources/js/jquery.js"></script>
<script
	src="/xiaorong/resources/js/jquery.mCustomScrollbar.concat.min.js"></script>
 <!--弹出框效果-->
<script>
	$(document).ready(function() {
		//弹出文本性提示框
		$("#showPopTxt").click(function() {
			if($("#orderType").val() == ""){
				layer.msg('请先选择要导入的订单系统！！');
				return false;
			}
			$(".uploadContent").fadeIn();
		});
		//弹出：确认按钮
		$(".uploadBtn").click(function() {
			$("#excelForm").submit();
			$(".uploadContent").fadeOut();
			$.loading();
		});
		//弹出：取消或关闭按钮
		$(".falseBtn").click(function() {
			$(".pop_bg").fadeOut();
		});
		
		$(".table tr").dblclick(function(){
			var id = $(this).find(".ids").val();
			if(id != null){
				var url = "detail.do?id="+id;
				//window.open (url, "newwindow", "height=300, width=750, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no"); 
				//页面层-自定义
				layer.open({
				  type: 2,
				  fix: false, //不固定
				  area: ['700px', '450px'],
				  maxmin: true,
				  content: url
				});
			}
		});
	});
	
	function setValue(temp){
		if(temp){
			location.reload(true);
		}
	}
	
	function toEdit(id){
		if(id == ""){
			if($("#orderType").val() == ""){
				layer.msg('请先选择要导入的订单系统！！');
				return false;
			}
		}
		
		var url = "edit.do?orderType="+ $("#orderType").val()+ "&id=" +id ;
		layer.open({
		  type: 2,
		  fix: false, //不固定
		  area: ['700px', '450px'],
		  maxmin: true,
		  content: url,
		  end : function(layero, index){
			  location.reload();
		  }
		});
	}
	
	function changeOrderType(){
		var orderType = $("#orderType").val();
		location.href="list.do?orderType="+orderType;
	}
</script>
</head>
<body>
	<!--header-->
	<jsp:include page="../common/header.jsp"></jsp:include>

	<!-- 上传弹出框 -->
	<section class="pop_bg uploadContent">
		<div class="pop_cont">
			<!--title-->
			<h3>导入数据</h3>
			<!--content-->
			<div class="pop_cont_input">
				<form method="post" action="upload.do" id="excelForm" class="form-horizontal" enctype="multipart/form-data">
					<input type="hidden" name="orderType" value="${orderType }">
					<ul>
						<li>
							<span class="item_name" style="width:120px;">上传excel：</span>
					        <label class="uploadImg">
					         	<input name="filedata" type="file"/>
					         	<span>上传excel</span>
					        </label>
						</li>
						<li></li>
					</ul>
				</form>
			</div>
			<!--以pop_cont_text分界-->
			<div class="pop_cont_text">请选择2003版的xls文件上传！</div>
			<!--bottom:operate->button-->
			<div class="btm_btn">
				<input type="button" value="上传" class="input_btn trueBtn uploadBtn" /> 
				<input type="button" value="关闭" class="input_btn falseBtn" />
			</div>
		</div>
	</section>
	<!--结束：弹出框效果-->

	<section class="rt_wrap content mCustomScrollbar">
		<div class="rt_content">
			<p>&nbsp;</p>
			<div class="page_title">
				<h2 class="fl" style="margin-right:20px;">高风险订单管理</h2>
				<a class="fr top_rt_btn checkAuth" href="javascript:toEdit('')" auth="order:save">新增</a>
				<a class="fr top_rt_btn delete checkAuth" auth="order:delete">删除</a>
				<a class="fr top_rt_btn search">查询</a>
				<a class="fr top_rt_btn download checkAuth" auth="order:download">批量导出</a>
				<a class="fr top_rt_btn checkAuth" id="showPopTxt" auth="order:upload">批量导入</a>
				<select class="fr top_rt_btn"  id="orderType" onchange="changeOrderType()" style="height:32px;line-height: 32px;">
					<option <c:if test="${orderType==''}">selected</c:if> value="">全部订单</option>
					<option <c:if test="${orderType==1}">selected</c:if> value="1">系统一订单</option>
					<option <c:if test="${orderType==2}">selected</c:if> value="2">系统二订单</option>
				</select>
				
			</div>
			<table class="table">
				<tr>
					<th style="width: 40px;"><input type="checkbox" value="-1" id="checkAll" /><label for="checkAll">全选</label></th>
					<th>订单号</th>
					<!-- <th>报告日期</th> -->
					<th>订单日期</th>
					<th style="width:65px;">金额USD</th>
					<th>卡号</th>
					<th>持卡人</th>
					<th>乘机人1</th>
					<!-- <th>乘机人2</th> -->
					<th>IP国家</th>
					<th>航班日期</th>
					<th>航程</th>
					<!-- <th>联系电话</th> -->
					<!-- <th>邮箱</th> -->
					<th>处理结果</th>
					<th style="width:125px;">票号</th>
					<!-- <th>备注</th> -->
					<!-- <th>拒绝原因</th> -->
					<!-- <th>卡种</th> -->
					<!-- <th>购买人国家</th> -->
					
					<th>风险值</th><!-- 拓展属性1 -->
					<!-- <th>拓展属性2</th> -->
					<!-- <th>拓展属性3</th> -->
					<!-- <th>拓展属性4</th> -->
					<!-- <th>拓展属性5</th> -->
					<!-- <th>拓展属性6</th> -->
					<!-- <th>拓展属性7</th> -->
					<!-- <th>拓展属性8</th> -->
					<!-- <th>拓展属性9</th> -->
					
		            <th style="width:45px;">操作</th>
				</tr>
				<c:forEach items="${page.content}" var="one" varStatus="statu">
		        	 <tr>
		        	 	<td align="center">
			        	 	<input type="checkbox" class="ids" name="id" value="${one.id}" />
			        	</td>
		            	<td>
		            		${one.sn}
		            	</td>
		            	<%-- <td>
		            		${one.reportDate}
		            	</td> --%>
		            	<td>
		            		${one.orderDate}
		            	</td>
		            	<td>
		            		${one.amount}
		            	</td>
		            	<td>
		            		${one.cardNo}
		            	</td>
		            	<td>
		            		${one.cardKeeper}
		            	</td>
		            	<td>
		            		${one.passengerOne}
		            	</td>
		            	<%-- <td>
		            		${one.passengerTwo}
		            	</td> --%>
		            	<td>
		            		${one.ipCountry}
		            	</td>
		            	<td>
		            		${one.flightDate}
		            	</td>
		            	<td>
		            		${one.voyage}
		            	</td>
		            	<%-- <td>
		            		${one.telphone}
		            	</td>
		            	<td>
		            		${one.email}
		            	</td> --%>
		            	<td>
		            		${one.result}
		            	</td>
		            	<td>
		            		${one.ticketNo}
		            	</td>
		            	<%-- <td>
		            		${one.remark}
		            	</td> --%>
		            	<%-- <td>
		            		${one.refuseResult}
		            	</td> --%>
		            	<%-- <td>
		            		${one.cardSpecies}
		            	</td> --%>
		            	<%-- <td>
		            		${one.buyerCountry}
		            	</td> --%>
		            	
		            	<!-- 拓展属性 -->
		            	 
		            	<td>
		            		${one.attribute1}
		            	</td>
		            	<%--<td>
		            		${one.attribute2}
		            	</td>
		            	<td>
		            		${one.attribute3}
		            	</td>
		            	<td>
		            		${one.attribute4}
		            	</td>
		            	<td>
		            		${one.attribute5}
		            	</td>
		            	<td>
		            		${one.attribute6}
		            	</td>
		            	<td>
		            		${one.attribute7}
		            	</td>
		            	<td>
		            		${one.attribute8}
		            	</td>
		            	<td>
		            		${one.attribute9}
		            	</td>
		            	 --%>
		            	
		            	<td>
		            		<div class="btn-group">
								<a class="checkAuth" href="javascript:toEdit('${one.id }')" auth="order:update">编辑</a>
							</div>
		            	</td>
		            </tr>
		         </c:forEach>
			</table>
			<!--page nav-->
			<form id="pageForm" action="list.do">
				<input type="hidden" name="orderType" value="${orderType }">
				<jsp:include page="search.jsp"></jsp:include>
				<jsp:include page="../common/page.jsp"></jsp:include>
			</form>
		</div>
	</section>
	<!--结束：以下内容则可删除，仅为素材引用参考-->
</body>
</html>
